package com.yinhai.message.implement.im.tool;

import com.yinhai.core.common.api.config.impl.SysConfig;
import com.yinhai.im.api.client.YinHaiIMAPI;
/**
 * 
 * @author yanglq
 * 2017.4.7
 */
public class ImApiManager {
	public static YinHaiIMAPI api = null;
	public static YinHaiIMAPI getApi(){
		if (api == null) {
			synchronized (ImApiManager.class) {
				if (api == null) {
					String ip = SysConfig.getSysConfig("yinhaiIMip");
					String port = SysConfig.getSysConfig("yinhaiIMport");
					api = new YinHaiIMAPI(ip,Integer.parseInt(port));
				}
			}
		}
		return api;
	}
}
